<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新增码值类型</title>
</head>
<lui:context/>
<u:View basePath="/res-system/code" userJS="codeTypeAdd" delayLoadJs="false">
<body>
    <lui:dialogBody>
	    <form class="m-cust m-narrow" id='codeTypeAddFrm'>
	    	<lui:ajax url="${ctx }/sys/code/save/codeType" id="saveCodeTypeAjax" formQuery="#codeTypeAddFrm" formSubmit="true" 
	    	    onSuccess="SysCodeTypeAddPage.onSaveCodeTypeSucc" 
	            contentType="application/x-www-form-urlencoded" type="post"/>
	        <div class="form-group m-narrow row">
                <div class="col-xs-12">
                    <div class="col-xs-3">
                        <label class='m-label m-float-right' for="codeTypeId">码值类型ID：</label>
                    </div>
	                 <div class="col-xs-8">
	                     <input autofocus="autofocus" class='m-input form-control' id='codeTypeId' name='codeTypeId' 
	                        data-validate='true' data-not-empty='true' data-empty-text="码值类型ID不能为空" maxlength="18">
	                 </div>
                </div>
            </div>
	        <div class="form-group m-narrow row">
                <div class="col-xs-12">
                    <div class="col-xs-3">
                        <label class='m-label m-float-right' for="codeTypeName">名称：</label>
                    </div>
	                 <div class="col-xs-8">
	                     <input class='m-input form-control' id='codeTypeName' name='codeTypeName' 
	                        data-validate='true' data-not-empty='true' data-empty-text="码值类型名称不能为空" maxlength="18">
	                 </div>
                </div>
            </div>
	        <div class="form-group m-narrow row">
                <div class="col-xs-12">
                    <div class="col-xs-3">
                        <label class='m-label m-float-right' for="state">状态：</label>
                    </div>
	                 <div class="col-xs-8">
	                     <select class='m-input form-control' id='state' name='state'>
	                     	<option selected="selected" value="1">正常</option>
	                     	<option value="0">禁用</option>
	                     </select>
	                 </div>
                </div>
            </div>
            <c:if test="${not empty requestScope.typeId}">
	            <lui:ajax url="${ctx }/sys/code/find/codeType/${requestScope.typeId}" id="findOneCodeTypeById" 
		    	    onSuccess="SysCodeTypeAddPage.onFindOneCodeTypeSucc" autoSend='true'/>
		    </c:if>
	    </form>
	</lui:dialogBody>
	<lui:dialogFooter>
       <button class="btn btn-primary m-btn" type="button" onclick="SysCodeTypeAddPage.saveCodeType()">保存</button>
       <button class="btn btn-default m-btn" type="button" data-dismiss="dialog-box">关闭</button>
    </lui:dialogFooter>
</body>
</u:View>
</html>